<?php echo $__env->make('admin::layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="admin-main layui-anim layui-anim-upbit">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>充值记录</legend>
    </fieldset>
	<div class="demoTable layui-row">
		<div class="layui-form layui-form-pane" style="float:left;">
			<div class="layui-form-item">
				<label class="layui-form-label">快捷查询</label>
				<div class="layui-input-inline layui-form">
					<input class="layui-input" name="key" id="key" placeholder="请输入昵称|手机号">
				</div>
			</div>
        </div>
		<div class="layui-form layui-form-pane" style="float:left;width:460px">
			<div class="layui-form-item">
				<label class="layui-form-label">支付时间</label>
				<div style="width:72%" class="layui-input-inline layui-form">
					<input style="width:100%" type="text" class="layui-input" id="created_at" placeholder="请选择时间">
				</div>
			</div>	
		</div>
    </div>
	<div class="demoTable layui-row">
		<button class="layui-btn" style="margin-left:30px;margin-top:15px;" id="search" data-type="reload">查询</button>
		<a href="<?php echo e(route('shop_admin.recharge_log.index')); ?>" style="margin-top:15px;" class="layui-btn">重置</a>
	</div>
    <table class="layui-table" id="list" lay-filter="list"></table>
</div>
<?php echo $__env->make('admin::layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<script>
    layui.use(['table','form'], function() {
        var table = layui.table,form = layui.form,$ = layui.jquery;
        var tableIn = table.render({
			id: 'ad',
            elem: '#list',
            url: "<?php echo e(route('shop_admin.recharge_log.data')); ?>",
            method:'get',
			toolbar: '#topBtn',
			title:'充值记录',
			page: true,
            cols: [[
                {field:'id', title: '编号', width:100,align: 'center',fixed: true,sort: true}
                ,{field:'phone', title: '手机号',align: 'center', width:200}
                ,{field:'nick_name', title: '昵称',align: 'center', width:200}
				
				,{field:'order_no', title: '订单号',width:150,align: 'center'}
				,{field:'total_money', title: '到账金额（元）',width:200,align: 'center',sort: true}
				,{field:'deliver_money', title: '付款金额（元）',width:200,align: 'center',sort: true}
                
				,{field:'updated_at', title: '支付时间',align: 'center', width:200,sort: true}
            
            ]],
			limit: "<?php echo config('admin.common_limit'); ?>"
        });
		//搜索
        $('#search').on('click', function () {
			var updated_at 		= $('#created_at').val();
			var key  			= $('#key').val();
            if ($.trim(updated_at) === '' && $.trim(key) === ''){
                layer.msg("<?php echo config('admin.query_condition'); ?>", {icon: 0});
                return;
            }
			tableIn.reload({
				where: {updated_at:updated_at,key:key}
			});
        });
    }); 
</script>
</body>
</html>